﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<t_205_verk_hopur_12.Models.IndexViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Mitt.tv
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LogoText" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MenuBar" runat="server">
    <% Html.RenderPartial("MenuBar"); %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <% if (Model.Top4SubscribedChannels != null)
       { %>
        <% if(Model.Top4SubscribedChannels.Count() >= 1){ %>
        <h2>Vinsælustu stöðvarnar í áskrift</h2>
        
        <% foreach (var channel in Model.Top4SubscribedChannels)
           { %>
        <div class="PopularChannel">
            <%= Html.ActionLink("__IMG__" + channel.Name, "Index", "Channel", new { id = channel.ID }, null).ToString().Replace("__IMG__", "<img src='/Content/TempVideoIcon.png' title='"+Html.Encode(channel.Name)+"' alt='"+Html.Encode(channel.Name)+"' />") %>
        </div>   
        <% } %>
        <div class="clear"></div>
         <% } %>
    <% } %>

    <% if (Model.Top4Channels != null)
       { %>
       <% if(Model.Top4Channels.Count() >= 1){ %>
        <h2>Vinsælustu stöðvarnar</h2>
        
        <% foreach (var channel in Model.Top4Channels)
           { %>
        <div class="PopularChannel">
            <%= Html.ActionLink("__IMG__" + channel.Name, "Index", "Channel", new { id = channel.ID }, null).ToString().Replace("__IMG__", "<img src='/Content/TempVideoIcon.png' title='"+Html.Encode(channel.Name)+"' alt='"+Html.Encode(channel.Name)+"' />") %>
        </div>   
        <% } %>
        <div class="clear"></div>
        <% } %>
    <% } %>
    
    <% if (Model.YourTop4Channels != null)
       { %>
       <% if(Model.YourTop4Channels.Count() >= 1){ %>
        <h2>Stöðvarnar þínar</h2>
        
        <% foreach (var channel in Model.YourTop4Channels)
           { %>
        <div class="PopularChannel">
            <%= Html.ActionLink("__IMG__" + channel.Name, "Index", "Channel", new { id = channel.ID }, null).ToString().Replace("__IMG__", "<img src='/Content/TempVideoIcon.png' title='"+Html.Encode(channel.Name)+"' alt='"+Html.Encode(channel.Name)+"' />") %>
        </div>   
        <% } %>
        <div class="clear"></div>
        <% } %>
    <% } %>
</asp:Content>